import request from "@/utils/request"


export function chapterListByCourseId(courseId) {

  return request({

    url: `/admin/education/chapter/course/${courseId}`,
    method: 'get'
  })
}


export function addChapter(data) {

  return request({
    url: '/admin/education/chapter',
    method: 'post',
    data
  })
}

export function updateChapter(data) {

  return request({

    url: '/admin/education/chapter',
    method: 'put',
    data
  })
}

export function findChapterById(chapterId) {

  return request({
    url: `/admin/education/chapter/${chapterId}`,
    method: 'get'
  })
}
